package com.mtoolkit.socket.transocder;

import java.io.IOException;

import com.mtoolkit.socket.SocketRequest;

public class DefaultSocketRequestTranscoder implements SocketRequestTranscoder {

    @Override
    public byte[] sealRequest(SocketRequest request) throws IOException {
        return TranscoderUtil.object2Bytes(request);
    }

    @Override
    public SocketRequest unsealRequest(byte[] bytes) throws ClassNotFoundException, IOException {
        return TranscoderUtil.bytes2Object(bytes);
    }


}
